﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.IO;
using System.Net;

namespace Contract
{
    [ServiceContract(Namespace = "Contract")]
    public interface IDataUploader
    {
        
        [OperationContract]
        void Upload(MyFile mf);

        [OperationContract]
        Stream Download(string name);

        //this one for agent to agent file transfer
        [OperationContract]
        Stream GetFiletoAgent(string name);

        [OperationContract]
        void Delete(string name);

        [OperationContract]
        bool Login(string PCN, string Password);

        [OperationContract]
        int Register(string Email, string Password, string Fname, string Lname, string Gender);

        [OperationContract]
        MyFile[] GetfilesList(string Path);

        [OperationContract]
        int returnNumOfConnections();
        

        [OperationContract]
        void AddClientIPtoAgent(IPAddress ip);

    }


    [ServiceContract(Namespace = "Contract")]
    public interface ICallBack
    {

        [OperationContract(IsOneWay=true)]
        void SendMessageToClient(String msg);

        [OperationContract(IsOneWay=true)]
        void CallBackPushFileList(MyFile[] fl);
    }


}
